#ifndef DOORVIEW_H
#define DOORVIEW_H

#include "viewobject.h"

typedef struct DoorViewParam
{
    QString         m_resOpen;
    QString         m_resClose;
    QString         m_resIsolation;    //隔离
    QString         m_resFault;        //故障
    QString         m_resObstacle;     //障碍
    DoorViewParam()
    {
        m_resOpen = "";
        m_resClose = "";
        m_resIsolation = "";
        m_resFault = "";
        m_resObstacle = "";
    }
}DoorViewParam;

class DoorView : public ViewObject
{
    Q_OBJECT
public:
    static int m_id;
    Q_INVOKABLE explicit DoorView(QWidget *parent = 0);

    ~DoorView();

    void ShowObject();

    void GetAttribute(std::string&);

    void SetAttribute(std::string);

    void ParseXML(QDomElement* );

    void PacketXML(QDomElement*);

    void LoadDoorParams(QString);

    QString FindFile(QString prefix, QString name);

private:
    DoorViewParam* m_paramDoorView;
};

#endif // DOORVIEWOBJECT_H
